#pragma pack(4)
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>

int* printNumbers(int n, int* returnSize ) {
    int num = pow(10, n) - 1;
    int *parr = (int *) malloc(sizeof(int) * num);
    for (int i = 0; i < num; i++) {
        parr[i] = i + 1;
    }
    *returnSize = num;
    return parr;
}

int main() {
    int num = 9;
    int arr[9];
    for (int i = 0; i < num; i++) {
        printf("%d ", printNumbers(1, arr)[i]);
    }
    return 0;
}